<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@page import="java.util.List"%>
<%@page import="models.Course"%>
<%@page import="models.User"%>
<%@page import="service.UserDao"%>
<%@page import="org.hibernate.Session"%>
<%@page import="service.HibernateUtil"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
        <link href="style/tutor.css" type="text/css" rel="Stylesheet">
        <!-- include jQuery Library From Google Code -->
        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js" type="text/javascript"></script>

        <script type="text/javascript">
            $(document).ready(function(){
                //smooth pagina overloop
                $("body").css("display", "none"); 
                $("body").fadeIn("slow");
                
                $("#floatingMenu").click(function () {
                    $('#floatingMenuContent').slideToggle();
                });
            });
        </script>
        <jsp:useBean id="inhoud" scope="application" class="models.Bean" />   
        <jsp:setProperty name="inhoud" property="language" value="<%= models.Bean.getLanguage() %>" />
        <title>
            Three 2 Learn | Digital Classroom
        </title>
    </head>
    <body>       
        <div id="wrapper">
            <jsp:include page="sidebar.jsp"/>
            <div id="right">
                <jsp:include page="courseDescriptionList.jsp"/>
                <c:choose>
                    <c:when test="${not empty courseID}">
                        <div id="livestream">
                            <iframe src="http://www.livestream.com/webcaster/?channel=${streamname}" width="750px" height="500px"></iframe>
                        </div>
                        <br /><br />
                        <div>
                            <h2><jsp:setProperty name="inhoud" property="key" value="UploadFiles" />
                                <jsp:getProperty name="inhoud" property="key" /></h2>

                            <form action="" method="post"
                                  enctype="multipart/form-data">
                                <table>
                                    <tr>
                                        <td>
                                            Powerpoint:
                                        </td>
                                        <td>
                                            <input type="file" name="pptfile" size="50" accept=".ppt" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            PDF:
                                        </td>
                                        <td>
                                            <input type="file" name="pdffile" size="50" accept=".pdf" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <input type="submit" value="Upload File" />
                                        </td>
                                    </tr>
                                </table>
                            </form>
                        </div>
                    </c:when>
                    <c:otherwise>
                        <div id="courseList">
                            <ul>
                                <c:forEach var="course" items="${courses}">
                                    <li>
                                        <a href="tutorlivestream?courseID=${course.courseID}">${course.name}</a>
                                    </li>
                                </c:forEach>
                            </ul>
                        </div>
                    </c:otherwise>
                </c:choose>
            </div>
        </div>
    </body>




